<%@ Page Language="C#" MasterPageFile="~/GUI/Webpage/Admin/MasterAdmin.master" AutoEventWireup="true" CodeFile="TableManagement.aspx.cs" Inherits="GUI_Webpage_User" Title="Table management" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   <table class="tdHolder" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td>
                            <table  border="0" cellpadding="0" cellspacing="0">
                                <tr> 
                                    <td colspan="2">
                                        <img src="../../../GUI/Image/WebsiteTemplate/30-4/Title_Table.jpg" alt="Table management" /></td>
                                </tr>
                                
                                <tr>
                                    <td>
                                        <table class="TableOrderContent" cellpadding="5"; cellspacing="5">
                                             <tr>
                                            <td class="tdTextContent">
                                                    <table align="center" border="0" cellpadding="2" cellspacing="2">
                                                        <tr>
                                                            <td>
                                                                Table ID</td>
                                                            <td >
                                                    <asp:TextBox ID="txtTableID" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvTableID" runat="server" ErrorMessage="TableID is required" ControlToValidate="txtTableID"></asp:RequiredFieldValidator></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Number of seat</td>
                                                            <td>
                                                    <asp:TextBox ID="txtNumberSeat" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvNumber" runat="server" ErrorMessage="Number of seat is required" ControlToValidate="txtNumberSeat"></asp:RequiredFieldValidator></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Price</td>
                                                            <td >
                                                                <asp:TextBox ID="txtPrice" runat="server"></asp:TextBox>
                                                                <asp:RequiredFieldValidator ID="rfvPrice" runat="server" ErrorMessage="Price is required" ControlToValidate="txtPrice"></asp:RequiredFieldValidator></td>
                                                        </tr>
                                                        <tr>
                                                            <td >
                                                                Restaurant
                                                            </td>
                                                            <td>
                                                    <asp:DropDownList ID="drpRestaurant" runat="server" CssClass="controlText">
                                                    </asp:DropDownList></td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Picture</td>
                                                            <td>
                                                                <asp:FileUpload ID="filePicture" runat="server" /></td>
                                                        </tr>
                                                        <tr>
                                                            <td>
                                                                Description</td>
                                                            <td>
                                                                <asp:TextBox ID="txtDescription" runat="server" CssClass="controlText" TextMode="MultiLine"></asp:TextBox></td>
                                                        </tr>
                                                        <tr>
                                                            <td class="tdButton">
                                                                <asp:Button ID="btnCreate" runat="server" class="button" Text="Create" OnClick="btnCreate_Click" /></td>
                                                            <td class="tdButton">
                                                            </td>
                                                        </tr>
                                                    </table>
                                              
                                            </td>
                                </tr>
                                <tr>
                                        <td>
                                        <table cellpadding="0" cellspacing="0">
                                            <tr>
                                                <td colspan="3">
                                                    <strong>
                                                        <i>
                                                            LIST OF ALL TABLE
                                                        </i>
                                                    </strong>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3">
                                                    <asp:GridView ID="grvTable" runat="server" AutoGenerateColumns="False" 
                                                    OnRowCancelingEdit="grvTable_RowCancelingEdit" 
                                                    OnRowDeleting="grvTable_RowDeleting" 
                                                    OnRowEditing="grvTable_RowEditing" 
                                                    OnRowUpdating="grvTable_RowUpdating" 
                                                    DataKeyNames="tableID" CellPadding="5">
                                                        <Columns>
                                                            <asp:BoundField DataField="tableID" HeaderText="TableID" />
                                                            <asp:BoundField DataField="numberOfPerson" HeaderText="Number of person" />
                                                            <asp:BoundField DataField="price" HeaderText="Price" />
                                                            <asp:BoundField DataField="resName" HeaderText="Restaurant" />                                                            
                                                            <asp:BoundField DataField="tableDescription" HeaderText="Description" />
                                                            <asp:CommandField ShowEditButton="True" />
                                                            <asp:CommandField ShowDeleteButton="True" />
                                                        </Columns>
                                                    </asp:GridView>
                                                </td>
                                                </tr>  
                                                                                                                                                                                   
                   </table>
              </td>
               </tr>
                                        </table>
                                    </td>
                                </tr>

                            </table>
                </td>
                </tr>
     </table>
</asp:Content>

